import {
  BrowserRouter as Router,
  Switch,
  Route,
  useParams,
  useHistory,
  useLocation,
} from "react-router-dom";
import "./index.css";
export default function Son() {
  const history = useHistory();
  const go = function () {
    history.push("/users/?name=son");
  };
  return (
    <div>
      我是儿子组件
      <button onClick={go}>调转到user ————编程时导航</button>
    </div>
  );
}
